package cn.yougou.serviceImpl;

import cn.yougou.mapper.YgCommodityProductMapper;
import cn.yougou.pojo.YgCommodityProduct;
import cn.yougou.service.admin.YgAdminCpService;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * 商品规格组合
 */

@Service
public class YgAdminCpServiceImpl implements YgAdminCpService {

    @Autowired
    private YgCommodityProductMapper ygCommodityProductMapper;

    /**
     * 插入数据
     * @param ygCommodityProduct
     * @return
     */
    @Override
    public int insert(YgCommodityProduct ygCommodityProduct) {
        return ygCommodityProductMapper.insert(ygCommodityProduct);
    }

    /**
     * 逻辑删除
     * @param ygCommodityProduct
     * @return
     */
    @Override
    public int delete(YgCommodityProduct ygCommodityProduct) {
        return ygCommodityProductMapper.delete(ygCommodityProduct);
    }

    /**
     * 根据实体类查询
     * @param ygCommodityProduct
     * @return
     */
    @Override
    public List<YgCommodityProduct> queryList(YgCommodityProduct ygCommodityProduct) {
        return ygCommodityProductMapper.queryList(ygCommodityProduct);
    }

    /**
     * 根据实体类更新
     * @param ygCommodityProduct
     * @return
     */
    @Override
    public int update(YgCommodityProduct ygCommodityProduct) {
        return ygCommodityProductMapper.update(ygCommodityProduct);
    }


}
